<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>编辑文章</title>
    <style>
        a {
            text-decoration: none;
            color: #1106ff;
        }
        tr{
            line-height: 100px;
            font-size:25px;
        }
        td{
            text-align: center;
        }

        li:hover{
            background-color: #269abc;
        }
        li{
            padding-top: 10px;
            padding-bottom: 10px;
        }
        input{
            font-size: 18px;
        }
        textarea{
            font-size: 18px;
        }
        input:hover ,input:focus{
            background-color: #f0f0f0;
            border: 1px solid #007BFF;
            box-shadow: 0 0 20px blue;
        }
        textarea:hover,textarea:focus{
            background-color: #f0f0f0;
            border: 1px solid #007BFF;
            box-shadow: 0 0 20px blue;
        }
        textarea::placeholder{
            font-size: 20px;
        }
        input[type='submit']:hover,input[type='reset']:hover{
            background-color: white;
        }
        input[type='submit']:focus,input[type='reset']:focus{
            background-color: white;
        }
        ul:hover{
            background-color: #a6e1ec;
        }
    </style>
</head>
<body>
<div  style="height:8vh;margin-top: 10px;margin-bottom: 10px" th:insert="~{back/header::head}"></div>
<div style="height:92vh;width: 20%;float: left;" th:insert="~{back/header::left}" ></div>
<div style="margin-left: 20%;text-align: center" >
    <th:block th:if="${isModify == 0}">
        <h1 style="text-align: center">发布文章</h1>
    </th:block>
    <th:block th:if="${isModify == 1}">
        <h1 style="text-align: center">修改文章</h1>
    </th:block>
    <form th:action="@{/back/editArticle}" method="post">
        <input type="hidden" name="isModify" th:value="${isModify}">
        <th:block th:if="${isModify == 1}">
            <input type="hidden" name="id" th:value="${aId}">
        </th:block>
        <label>
            <input type="text" name="title" th:value="${title}" placeholder="请输入标题"
                   style="width: 400px;height: 30px;margin-left: 20px;
                   margin-top: 20px" required/>
        </label><br>
        <label>
            <textarea name="content" th:text="${content}" style="width: 600px;
            height: 200px;margin-left: 20px;
            margin: 30px auto" placeholder="请输入文章内容" required></textarea>
        </label><br>
        <th:block th:if="${isModify == 0}">
            <input type="submit" value="发布" style="width: 200px;height: 30px;
            margin-left: 20px;margin-top: 20px"/>
        </th:block>
        <th:block th:if="${isModify == 1}">
            <input type="submit" value="修改" style="width: 200px;height: 30px;
            margin-left: 20px;margin-top: 20px"/>
        </th:block>
        <input type="reset" value="重置" style="width: 200px;height: 30px;
        margin-left: 20px;margin-top: 20px"/>
    </form>
</div>
</body>
</html>